/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package example;




import com.erp.client.DAO.RzLog;
import com.erp.client.DAO.SeriaRzLog;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.erp.client.DAO.ServerUserBase;
import com.erp.client.DAO.UserBaseInf;
import com.erp.server.DB.DbConn;

import com.erp.client.Stock1;
import com.google.gwt.i18n.client.DateTimeFormat;
import java.sql.*;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;

import net.sf.json.JSONArray;

/**
 *
 * @author Administrator
 */
public class myRzlogServlet extends RemoteServiceServlet {



	public String processCall(String payLoad) {
		System.out.println("Received payLoad:" + payLoad);

		Object result = "";

        /*String testls = "";
        UserBaseInf userbaseinf = new UserBaseInf();
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        JSONArray jsonobject = new JSONArray();

        //Connection conn;
        DbConn dc = new DbConn();
        String strSql = "select * from userBaseInf ";//where LoginID='tt'";
        Connection conn = DbConn.getCon();
        conn = dc.getConn_jdbc();
        try {
        Statement stmt =  (Statement) conn.createStatement();
        ResultSet rs = stmt.executeQuery(strSql);

        while (rs.next()) {
        userbaseinf.setLoginId(rs.getString("loginId"));
        userbaseinf.setUserName(rs.getString("userName"));
        userbaseinf.setPassword(rs.getString("password"));
        userbaseinf.setUserId(rs.getInt("userId"));
        //userbaseinf.setLockDate(rs.getDate("lockDate"));
        //mangeright.add(userbaseinf);
        //userbaseinf=null;
        jsonobject.add(userbaseinf);
        }

        } catch (SQLException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
        } finally {
        dc.CloseConn();
        }
        //JSONArray jsonobject = JSONArray.fromObject(userbaseinf);
        System.out.println(jsonobject);
        testls = jsonobject.toString();


        if (!payLoad.startsWith("getRuntimeResults")) {

        }
        System.out.println("Return Result:" + result.toString());*/
		return payLoad+"test ok";
	}
}
